#include "mainwindow.h"
#include <QApplication>
#include <QSplitter>
#include <QTextEdit>
#include <QTextCodec>

int main(int argc, char *argv[])
{
    QApplication a(argc, argv);
//    MainWindow w;
//    w.show();

    QFont font("ZYSong18030", 12);
    a.setFont(font);

    // 主分割窗口
    QSplitter* mainSplitter = new QSplitter(Qt::Horizontal, nullptr);
    QTextEdit* textLeft = new QTextEdit(QObject::tr("Left widge"), mainSplitter);
    textLeft->setAlignment(Qt::AlignCenter);

    // 右分割窗口
    QSplitter* rightSplitter = new QSplitter(Qt::Vertical, mainSplitter);
    rightSplitter->setOpaqueResize(false);

    QTextEdit* textTop = new QTextEdit(QObject::tr("Top widge"), rightSplitter);
    textTop->setAlignment(Qt::AlignCenter);

    QTextEdit* textBottom = new QTextEdit(QObject::tr("Bottom widge"), rightSplitter);
    textBottom->setAlignment(Qt::AlignCenter);

    mainSplitter->setStretchFactor(1, 1);
    mainSplitter->setWindowTitle(QObject::tr("splitter"));

    mainSplitter->show();
    return a.exec();
}
